import java.io.*;
import java.util.*;

public class Item implements Serializable, Comparable<Item>{
   
    private static final long serialVersionUID = 1;
    public final int itemID;

    private int quantity;
    private  String productName;

    public Item(int itemID, String productName, int quantity) {
	this.productName = productName;
	this.itemID  = itemID;
	this.quantity = quantity;
    }

    public Item(int itemID, String productName) {                  //Oveloaded constructor allows items to be initiated without a specified quantity, setting it to 0 by default.
	this.productName = productName;
	this.itemID  = itemID;
	this.quantity = 0;
    }

   public int compareTo(Item other) {
	return (this.itemID - other.itemID);
    }

    public void setQuantity (int input) {
	quantity = input;
    }
  public void setProductName (String input) {
	productName = input;
    }

    public String getProductName() {
	return productName;
    }
    public int getQuantity() {
        return quantity;
    }

}